{extend name="../../admin/view/main"}

{block name="button"}
<button data-table-id="BaseTable" data-modal='{:url("add")}?type={$type|default=""}'
        class='layui-btn layui-btn-sm layui-btn-primary'>创建Banner
</button>
{/block}

{block name="content"}
<div class="layui-tab layui-tab-card think-bg-white">
    <div class="layui-tab-content table-block">
        <table class="layui-table" lay-skin="line">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
                </th>
                <th class='text-left' >ID</th>
                <th class='text-left' >排序</th>
                <th class='text-left' >图片</th>
                <th class="text-left" style="width: 200px;">操作</th>
                <th></th>
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='list-table-check-td think-checkbox'>
                    <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
                </td>
                <td class='text-left ' >{$vo.id|default=''}</td>
                <td class='text-left ' >{$vo.sort|default=''}</td>
                <td class='text-left' >
                    <img src="{$vo.image|default=''}" style="max-width:526px; width: 526px; height: 100px !important;">
                </td>
                <td class='text-left' style="width: 200px;">
                    <a class="layui-btn layui-btn-danger layui-btn-sm" data-confirm="确定要删除数据吗?"
                       data-action="{:url('remove')}" data-value="id#{$vo.id}">删 除</a>
                    <a class="layui-btn layui-btn-sm" data-modal="{:url('edit')}?id={$vo.id}" data-title="编辑信息">{:lang("编
                        辑")}</a>
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
        <div style="margin-top: -5px;">{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
        </div>
    </div>
</div>
{/block}